<jsp:useBean id="coord" class="dasregistry.coordBean" scope="page"/>
<jsp:useBean id="register" class="dasregistry.registryBean" scope="session"/>
<jsp:directive.page import="org.biojava.dasobert.dasregistry.DasCoordinateSystem"/>




<% String title="help on coordinate systems";
   String header= title;

%>


<%@ include file="sangerheader.jsp" %>

<jsp:include page="openwindowscript.jsp" />

<div id="main">

<h2>Coordinate Systems</h2>

<p>

<%@ include file="sangertablestart.jsp" %>

<table width="550" border="0">
<tr><td>

<p> The DAS registration server uses <b>coordinate systems</b> to
describe the data that is made available by a DAS source. This
information is important for the DAS clients, to deal with data
correctly, as they often can accept data served in multiple coordinate
systems.  </p>
<p>
The coordinate systems are described by four fields: <b>Authority, (assembly) Version,  Type, and Organism</b>.
The assembly version is important for genome assemblies, but not really applicable for other datasets like UniProt sequences,
therefore this field is optional.
</p>
<p>
Also note: "Gene ID" sources do not have annotations of sequence at all, they annotate only the "concept" of the gene rather than its actual sequence. If your type can have sequence and coordinates then it should be "Type Sequence". Likewise, UniProt is "Protein Sequence" because the reference object does in fact has a sequence and coordinates that mean something.

Versions: remember individual transcripts can have versions too. This is probably a better way of doing it for a coordinate system which has frequent "set changes" (e.g. Havana releases) but many of the reference objects do not change between sets. This is similar to UniProt's model, who version their reference objects per-protein not per-release.
</p>
</td></tr>
</table>
<%@ include file="sangertableend.jsp" %>
<p/>

<%@ include file="sangertablestart.jsp" %>
<table width="550" border="0">
<tr><td>
<a name="name"><h3>Authority</h3></a>
The name of an authority/institution that defines the accession codes of a coordinate system or that 
provides a gene-build.  In the latter case this field also contains the version number of the assembly.
Currently the following authority names are supported (for assembly authorities we added the assembly version):

<ul>
	<%
	 String[] names = coord.getNames();
	   int nameslength = 0 ;
	   if ( names != null ) {
	      nameslength = names.length;   
	   }
	   for ( int i =0; i< nameslength; i++ ) {
	       out.print("<li>"+names[i]+"</li>");
	   }
	%>
</ul>

</td></tr>
</table>
<%@ include file="sangertableend.jsp" %>
<p/>


<%@ include file="sangertablestart.jsp" %>
<table width="550" border="0">
<tr><td>
<a name="type"><h3>Type</h3></a>
A type or category of the coordinate system. This refers to the "physical dimension" of the
annotated data. Currently the following categories are available:
<ul>
	<%
	 String[] types = register.getCoordSysTypes();
	   int typeslength = 0 ;
	   if ( types != null ) {
	      typeslength = types.length;   
	   }
	   for ( int i =0; i< typeslength; i++ ) {
	       out.print("<li>"+types[i]+"</li>");
	   }
	%>
</ul>
</td></tr>
</table>
<%@ include file="sangertableend.jsp" %>
<p/>

<%@ include file="sangertablestart.jsp" %>
<table width="550" border="0">
<tr><td>
<a name="organism"><h3>Organism</h3></a>
The organism the data refers to. Not every DAS source is organism specific, therefore this field is optional.

</td></tr>
</table>
<%@ include file="sangertableend.jsp" %>

<hr/>

<h2>Listing of all coordinate systems</h2>
<p>

Using the fields described above, currently the following coordinate systems are provided.<br/>
[<a href="javascript:openWindow('listCoords.jsp','available coordinate systems',640,480)">show in separate window</a>]

</p>

<%@ include  file="listCoords.jsp" %>
</p>
</div>
<%@ include file="sangerfooter.jsp" %>


